<template>
  <div class="admin">
      <el-menu
        default-active="1"
        class="el-menu-vertical-demo nav"
        @open="handleOpen"
        @close="handleClose"
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b"
      >
      <!-- <router-link to="/admin/orders">
        <el-menu-item index="3">
          <i class="el-icon-s-data"></i>
          <span slot="title">平台数据</span>
        </el-menu-item>
      </router-link> -->
      <router-link to="/admin/index">
      <el-menu-item index="1">
          <i class="el-icon-star-on"></i>
          <span slot="title">管理员信息</span>
        </el-menu-item>
      </router-link>
      <router-link to="/admin/qiye">
        <el-menu-item index="2">
          <i class="el-icon-s-platform"></i>
          <span slot="title">企业信息</span>
        </el-menu-item>
      </router-link>
      <router-link to="/login">
        <el-menu-item index="5">
          <i class="el-icon-switch-button"></i>
          <span slot="title">退出系统</span>
        </el-menu-item>
      </router-link>
      </el-menu>

    <router-view class="com"></router-view>
  </div>
</template>

<style>
.admin{
    display: flex;
    flex-direction: row;
}
.nav {
  width: 180px;
  height: 100vh;
  /* position: absolute;
  margin-top:0px;
  margin-left: 0px; */
  background-color: #545C64;
  border-right: 2px solid #FFF;
}
.com{
    width: calc(100vw - 180px);
    height: 100vh;
    /* background-color: #409EFF; */
    overflow: auto;
    flex: 1;
}
</style>

<script>
export default {
  data() {
    return {
      index:'1',
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>